<?= $this->element('back', array('link' => '/finance/' . $data['Finance']['type'])) ?>
<h1><?= strtotitle(__('new')) ?> <?= __($data['Finance']['type']) ?></h1>
<?= $this->Form->create('Finance', array('url'=>'/finance/save')) ?>
    
    <?= $this->Form->hidden('id', array('value' => $data['Finance']['id'])) ?>
    <?= $this->Form->hidden('type', array('value' => $data['Finance']['type'])) ?>
    
    <div class="left span40p">
        <?= $this->App->input('date', 'date', $data['Finance']['date']) ?>
    </div>
    <? if ($data['Finance']['type'] == 'expense'): ?>
    <div class="left span40p">
        <?= $this->App->input('date_valuta', 'date', $data['Finance']['date_valuta']) ?>
    </div>
    <? endif ?>
    <?= $this->App->input('amount', 'text', $data['Finance']['amount'], array('class'=>'float-number')) ?>
    <?= $this->App->input('entity', 'text', $data['Finance']['entity'], array('label'=>'payer', 'class'=>'large')) ?>
    <?= $this->App->input('description', 'text', $data['Finance']['description'], array('class'=>'large')) ?>
    
    <?= $this->App->input('notes', 'textarea', $data['Finance']['notes'], array('class'=>'span50p')) ?>
    
    <br clear="all">
<?= $this->Form->end(strtotitle(__('save'))) ?>